
import 'package:typed_data/typed_data.dart';
//定义回调
import 'dart:typed_data';

typedef OnConnected = Function();
typedef OnDisconnected = Function();
typedef OnSubscribed = Function(String topic);
typedef OnSubscribeFail = Function(String topic);
typedef OnUnsubscribed = Function(String topic);
typedef OnMessageed = Function(String topic,Uint8Buffer byteBuffer);
typedef Pong = Function();

class MqttCallBack{
  final OnConnected onConnected;
  final OnDisconnected onDisconnected;
  final OnSubscribed onSubscribed;
  final OnSubscribeFail onSubscribeFail;
  final OnUnsubscribed onUnsubscribed;
  final OnMessageed onMessageed;
  final Pong pong;

  MqttCallBack(this.onConnected, this.onDisconnected, this.onSubscribed, this.onSubscribeFail, this.onUnsubscribed,this.onMessageed, this.pong);
}